﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace GameBanChim_Version1
{
    public class StateHelp : GameState
    {
        Background _backGround;

        Button _button;

        public override void InnitState(MyGame owner)
        {
            base.InnitState(owner);
            _backGround = (Background)MyGameOwner.BackGroundManager.CreateObject(5);

            _button = (Button)MyGameOwner.ButtonManager.CreateObject(4);
            _button.Sprite[0].Itexture2D = 0;
        }

        public override void Update(GameTime gameTime)
        {
            _backGround.Update(gameTime);
            if (_button.isHover())
            {

            }
            if (_button.isRelease())
            {

            }
            if (_button.isClicked())
            {
                MyGameOwner.MyGameState = new StateMenu();
                MyGameOwner.MyGameState.InnitState(MyGameOwner);
            }
        }

        public override void Draw(GameTime gameTime, SpriteBatch sb)
        {
            _backGround.Draw(gameTime, sb);
            _button.Draw(gameTime, sb);
        }
    }
}
